﻿namespace Collaboris.Saf.Agent.Tests.Support.Actions
{
    using System.IO;

    using Engine;

    public class CreateFile : ActionBase<Entity.FileInfo>
    {
        protected override ProcessStatus DoAction(SafContext context, Entity.FileInfo entity)
        {
            if (File.Exists(entity.FilePath))
                File.Delete(entity.FilePath);

            File.Create(entity.FilePath);

            return ProcessStatus.Success;
        }
    }
}
